export default {
  computed: {
    tableProps () {
      return {
        columns: this.columns,
        loading: this.tableLoading,
        size: 'middle',
        pagination: this.paginationProps,
        dataSource: this.pagination.items,
        scroll: { x: '1200px' },
      }
    },
  },

  data () {
    return {
      columns: [
        {
          title: '订单号',
          dataIndex: 'number',
          width: '200px',
          ellipsis: true,
          align: 'center',
          scopedSlots: { customRender: 'number' },
        },
        {
          title: '姓',
          dataIndex: 'last_name',
          width: '60px',
          align: 'center',
          ellipsis: true,
        },
        {
          title: '名',
          dataIndex: 'first_name',
          width: '60px',
          align: 'center',
          ellipsis: true,
        },
        {
          title: '手机号',
          dataIndex: 'mobile',
          width: '160px',
          align: 'center',
          ellipsis: true,
        },
        {
          title: '邮箱',
          dataIndex: 'email',
          width: '160px',
          align: 'center',
          ellipsis: true,
        },
        {
          title: '到期日',
          dataIndex: 'duedate',
          width: '160px',
          align: 'center',
          ellipsis: true,
        },
        {
          title: '期数',
          dataIndex: 'order',
          width: '160px',
          align: 'center',
          ellipsis: true,
        },
        {
          title: '逾期天数',
          dataIndex: 'due_days',
          width: '160px',
          align: 'center',
          ellipsis: true,
        },
        {
          title: '当期应还总金额$',
          dataIndex: 'amount',
          width: '160px',
          align: 'center',
          ellipsis: true,
        },
        {
          title: '滞纳金$',
          dataIndex: 'late_fee',
          width: '160px',
          align: 'center',
          ellipsis: true,
        },
        {
          title: '还款状态',
          dataIndex: 'status',
          width: '160px',
          scopedSlots: { customRender: 'status' },
          align: 'center',
          fixed: 'right',
        },
      ],
    }
  },

  methods: {
    // hanlder row
    hanlderRow ({ task_id: tid }) {
      this.$router.push({
        name: 'ExamineAwaitDetails',
        params: { tid },
      })
    },
  },
}
